class AddMathTechElectives < ActiveRecord::Migration
  def self.up
    math_elective_numbers = [2403, 4012, 4032, 4150, 4221, 4222, 4255, 4261, 4262, 4280, 4318, 4320, 4431, 4432, 4640, 4641]
    cs_elective_numbers = [2200, 3251, 4240]
    
    math_elective_numbers.each do |e|
      execute "insert into `technical_electives` (\"major_id\", \"course_id\") values (1, #{Course.with_number('MATH' + e.to_s).id})"
    end
    cs_elective_numbers.each do |e|
      execute "insert into `technical_electives` (\"major_id\", \"course_id\") values (2, #{Course.with_number('CS' + e.to_s).id})"
    end
    
  end

  def self.down
    execute "delete from `technical_electives`"
  end
end
